<template>
  <div class="app-container">
    <el-radio-group v-model="radioType">
      <el-radio label="1" border>项目库二级项目</el-radio>
      <el-radio label="2" border>一上预算编制</el-radio>
      <el-radio label="3" border>二上预算编制</el-radio>
    </el-radio-group>
    <div class="app-container">
      <projectTwo @openProjectKpi="openProjectKpiFn" v-if="radioType === '1'"></projectTwo>
      <budgetOne @openProjectKpi="openProjectKpiFn" v-if="radioType === '2'"></budgetOne>
      <budgetTwo @openProjectKpi="openProjectKpiFn" v-if="radioType === '3'"></budgetTwo>
    </div>
  </div>
</template>

<script>
import projectTwo from "./components/projectTwo"
import budgetOne from './components/budgetOne'
import budgetTwo from './components/budgetTwo'

export default {
  name: 'projectDetails',
  components: {
    projectTwo,
    budgetOne,
    budgetTwo
  },
  data() {
    return {
      routes: [],
      radioType: '1',
    }
  },
  computed: {
    routesData() {
      return this.routes
    }
  },
  created() {
  },
  methods: {
    openProjectKpiFn(data) {
      this.goTargetByName('budgetPerformancePreview', {id: data.id, type: data.type})
    }
  }
}
</script>
